<div class="contents">
  <ol class="breadcrumb">
    <li><a href="#/index/panel">首页</a></li>
    <li class="active">活动商品列表</li>
  </ol>
  <form class="form-inline search-box" role="form" ng-submit="search()" novalidate>
    <div class="form-group">
      <input class="form-control" placeholder="产品名称" name="oPName" ng-model="productKw" autocomplete="off"  ng-change="searchProduct()"/>
      <ul class="million-product-list" ng-show="showSearchCombox">
        <li ng-repeat="p in products" title="{{p.pName}}" ng-click="selectProduct(p.id,p.pName)">{{p.pName}}</li>
        <li ng-if="loaded && products.length < 1">没有符合条件的产品</li>
      </ul>
    </div>
    <div class="form-group">
      <select class="form-control" name="activitiesCode" ng-model="searchMap.activitiesCode" ng-options="m.value as m.text for m in dictMap['activitiesCodeModel']" required="required"><option value="">--选择活动--</option></select>
    </div>
    <div class="form-group">
      <select class="form-control" name="activitiesProductType" ng-model="searchMap.activitiesProductType" ng-options="m.value as m.text for m in dictMap['millionTypeModel']" required="required"><option value="">--选择人群--</option></select>
    </div>
    <button type="submit" class="btn btn-default">查询</button>
  </form>
  <table class="table table-striped table-hover">
    <thead>
      <tr>
        <th width="80">ID</th>
        <th width="120">活动名称</th>
        <th width="">产品名称</th>
        <th width="150" ng-show="config.activitiesCode == 'BWCFJH'">产品销售状态</th>
        <th width="150" ng-show="config.activitiesCode == 'BWCFJH'">奖励金额</th>
        <th width="100" ng-show="config.activitiesCode == 'BWCFJH'">开始日期</th>
        <th width="100" ng-show="config.activitiesCode == 'BWCFJH'">结束日期</th>
        <th width="100" ng-show="config.activitiesCode == 'BWCFJH'">人群</th>
        <th width="100" ng-show="config.activitiesCode == 'BWCFJH'">状态</th>
        <th width="180">操作</th>
      </tr>
    </thead>
    <tbody>
      <tr ng-repeat="item in list">
        <td>{{item.activitiesMollionsWealth.id}}</td>
        <td>{{item.activitiesMollionsWealth.activitiesCode | activitiesCodeRender}}</td>
        <td>{{item.product.pName}}</td>
        <td ng-show="config.activitiesCode == 'BWCFJH'">{{item.product.pSaleStatus | productSaleStatusRender}}</td>
        <td ng-show="config.activitiesCode == 'BWCFJH'">{{item.activitiesMollionsWealth.amount | moneyRender}}</td>
        <td ng-show="config.activitiesCode == 'BWCFJH'">{{item.activitiesMollionsWealth.beginTime | date:'yyyy-MM-dd'}}</td>
        <td ng-show="config.activitiesCode == 'BWCFJH'">{{item.activitiesMollionsWealth.endTime | date:'yyyy-MM-dd'}}</td>
        <td ng-show="config.activitiesCode == 'BWCFJH'" class="product-public-status-{{item.activitiesMollionsWealth.activitiesProductType}}">{{item.activitiesMollionsWealth.activitiesProductType | millionTypeRender}}</td>
        <td ng-show="config.activitiesCode == 'BWCFJH'"><span ng-class="{'text-muted':item.activitiesMollionsWealth.status=='3','text-primary':item.activitiesMollionsWealth.status=='1'}">{{item.activitiesMollionsWealth.status | millionStatusRender}}</span></td>
        <td class="optd">
          <a href="#/million/edit?id={{item.activitiesMollionsWealth.id}}&&activityCode={{item.activitiesMollionsWealth.activitiesCode}}">编辑</a>
          <a class="cur-p" ng-click="remove(item.activitiesMollionsWealth.id)">删除</a>
        </td>
      </tr>
    </tbody>
  </table>

	<div class="pager-box" ng-include src="'tpl/public/pager.html'" ng-show="list.length > 0"></div>
</div>
